#include "CustomMenu.h"
#include "CommonUtils.h"

CustomMenu::CustomMenu(QWidget *parent)
	: QMenu(parent)
{
	setAttribute(Qt::WidgetAttribute::WA_TranslucentBackground, true);
	CommonUtils::loadStyleSheet(this, "Menu");
}

CustomMenu::~CustomMenu()
{
}

QAction * CustomMenu::getAction(const QString & name)
{
	return m_menuActionMap[name];
}

void CustomMenu::addCustomMenu(const QString& name, const QString &path)
{
	QAction *action = addAction(QIcon(path), name);
	m_menuActionMap.insert(name, action);
}
